
SUBDIRS = copulas distributions integrals interpolations \
          matrixutilities optimization randomnumbers solvers1d \
          statistics

AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir}

this_includedir=${includedir}/${subdir}
this_include_HEADERS = \
	all.hpp \
	array.hpp \
	bernsteinpolynomial.hpp \
	beta.hpp \
	bspline.hpp \
	comparison.hpp \
	curve.hpp \
	domain.hpp \
	errorfunction.hpp \
	factorial.hpp \
	functional.hpp \
	generallinearleastsquares.hpp \
	kernelfunctions.hpp \
	incompletegamma.hpp \
	interpolation.hpp \
	lexicographicalview.hpp \
	linearleastsquaresregression.hpp \
	matrix.hpp \
	primenumbers.hpp \
	quadratic.hpp \
	rounding.hpp \
	sampledcurve.hpp \
	solver1d.hpp \
	surface.hpp \
	transformedgrid.hpp

libMath_la_SOURCES = \
	bernsteinpolynomial.cpp \
	beta.cpp \
	bspline.cpp \
	errorfunction.cpp \
	factorial.cpp \
	incompletegamma.cpp \
	matrix.cpp \
	primenumbers.cpp \
	quadratic.cpp \
	rounding.cpp \
	sampledcurve.cpp \
	surface.cpp

libMath_la_LIBADD = \
    copulas/libCopulas.la \
    distributions/libDistributions.la \
    integrals/libIntegrals.la \
    matrixutilities/libMatrixUtilities.la \
    optimization/libOptimization.la \
    randomnumbers/libRandomNumbers.la \
    statistics/libStatistics.la

noinst_LTLIBRARIES = libMath.la

all.hpp: Makefile.am
	echo "/* This file is automatically generated; do not edit.     */" > $@
	echo "/* Add the files to be included into Makefile.am instead. */" >> $@
	echo >> $@
	for i in $(filter-out all.hpp, $(this_include_HEADERS)); do \
		echo "#include <${subdir}/$$i>" >> $@; \
	done
	echo >> $@
	subdirs='$(SUBDIRS)'; for i in $$subdirs; do \
		echo "#include <${subdir}/$$i/all.hpp>" >> $@; \
	done

